<template>
  <div class="markContent">
    <group>
        <cell class="markCell" :title="('检查组长')" :value="(member)"></cell>
        <cell class="markCell" is-link :title="('评分')" :value="(score)" :link="{path: '/markEdit'}"></cell>
    </group> 
    <div class="markSubmit"><button class="markSubmitBtn" @click="submitHandle">提交</button></div>
    <myMenu></myMenu>
</div>

</template>

<script>
import myMenu from '@/commonComponents/menu'
export default {
  name: 'markEdit',
  data () {
        return {
            userInfo: {},//用户信息
            member: this.$store.state.checkGroupLeader,//检查组长
            score: this.$store.state.scores,//分数
            checkId: this.$store.state.checkId//检查id
        }
 },
  components: {
     myMenu
  },
  created () {
      this.userInfo = JSON.parse(localStorage.getItem('userInfo'))
      console.log(this.$store.state)
  },
  methods: {
      //评分提交
      submitHandle () {
          var that = this 
          var params = {
                "allowPaging": true,
                "business": "SubmitWaitingCheckWorkScore",
                "data": {
                    "CheckWorkId": this.checkId,
                    "Score": this.score
                },
                "pageIndex": 0,
                "pageSize": 0,
                "tokenId": "",
                "userId": this.userInfo.userid
            }
            this.$axiosAjax.getConfigJson(params)
            .then((res) =>{
                // console.log(res)
                if(res.data.code == 0){
                    this.$vux.toast.text('评分提交成功')
                     setTimeout(() => {
                        this.$router.push('/hideManager')
                    }, 1500)
                }else{
                    this.$vux.toast.text(res.data.info)  
                }                       
            })

      }
  }
}
</script>

<style scoped>
.markCell{
    height: 55px;
    line-height: 55px;
    font-size: 13px;
}
.markSubmit {
    position: absolute;
    bottom: 28px;
    left: 50%;
}
.markSubmitBtn{
    width: 200px;
    height: 40px;
    background: #2269ff;
    border-radius: 20px;
    color: #fff;
    font-size: 15px;
    margin-left: -100px;
}
</style>
<style>
.markContent .weui-cells{
    margin-top: 0;
}
.markContent .vux-no-group-title{
    margin-top: 0;
}
.markContent .weui-cells:before,.markContent .weui-cells:after{
    display: none;
}
.markContent .markCell:last-child::after{
    content: " ";
    position: absolute;
    left: 0;
    bottom: 0;
    right: 0;
    height: 1px;
    border-top: 1px solid #d9d9d9;
    color: #d9d9d9;
    -webkit-transform-origin: 0 0;
    transform-origin: 0 0;
    -webkit-transform: scaleY(.5);
    transform: scaleY(.5);
    left: 4vw;
}
.markContent .weui-cell__ft{
    color: #666;
}
</style>

